#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>

int main()
{
    int count = 0;
    alarm(2);
    while(1)
    {
       printf("你看这有%d只憨八嘎\n", ++count);
       if(count == 100){
         printf("alarm remain:%d", alarm(0));
         abort();
       }
    }
    return 0;
}
